<template> <!-- 3D页面 -->
  <div class="block-all flex-col">
    <div class="model-block-top">
      1112313

    </div>
    <div class="model-block-bottom">
      123156

    </div>

  </div>
</template>

<style scoped>

  .model-block-top{
    height:50px;
    display: flex;
    flex-direction: column;
  }

  .model-block-bottom{
    flex:1;
    display: flex;
    flex-direction: column;
    margin-top:10px;

  }





</style>


<script>
import { mapGetters } from 'vuex'
import { mapActions } from 'vuex'
import {
  queryTagTree
} from '../../api/labelManagement'



export default {
  name: '',
  data(){
    return{


      theHtml:'',



    }
  },
  created(){


  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  components:{
  },
  methods: {
    ...mapActions({}),

    handleClick(tab, event) {
      // console.log(tab, event);
    },


    //操作
    execCommand(name, args = null){
      document.execCommand(name, false, args);
    },


    //左侧文本区输入
    print() {
      this.theHtml = document.querySelector('.editor').innerHTML;
    },


    //创建链接
    createLinkOo() {
      let url = window.prompt('请输入链接地址');
      if (url) this.execCommand('createLink', url);
    },
    createLink() {
      this.$prompt('请输入链接地址', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      }).then(({ value }) => {
        this.execCommand('createLink', value);
      }).catch(() => {
      });

    },

    insertImg(e) {
      let reader = new FileReader();
      let file = e.target.files[0];
      reader.onload = () => {
        let base64Img = reader.result;
        this.execCommand('insertImage', base64Img);
        document.querySelector('.nav__img input').value = ''; // 解决同一张图片上传无效的问题
      };
      reader.readAsDataURL(file);
    }


  },
}
</script>
